This invention relates generally to data processing systems and more particularly to a method and apparatus for flexible, unified lock mechanism for accessing logical devices within a data storage system.
As it is known in the art, data processing systems generally include several types of processing resources which may be interconnected by one or more communication busses. In addition to the processor resources, data processing systems also generally include some sort of memory which is typically shared amongst the processor resources. As is common in many computer systems these processing resources may act independently to perform different processing tasks. Since each of the processing resources may act independently there may arise a situation where there is contention for the shared memory resources within the system.
One example of a data processing system which includes several processing resources coupled to a common memory over one or more busses are data storage systems such as the Symmetrix family of data storage systems manufactured by EMC Corporation. These storage systems are typically capable of being coupled to several different host computers at any given time and provide storage services to each of those computers independently. In order to support transactions between a plurality of host computers simultaneously the storage system includes several host controllers for managing the communication between the host computer and the storage system. In addition, the Symmetrix storage systems mentioned above include several disk controllers which are each responsible for managing one or more arrays of disk type storage devices.
In addition to the host controllers and disk controllers mentioned above the storage subsystem may also contain a very large global memory which is used to manage the transfer of data from the host computers to the storage devices as well as to manage the transfer of data from the storage devices to the host computer.
During the operation of the data storage system described above, in order to read or write data to a particular device in the storage system, it is often necessary for any one or the host computers to obtain a lock on a that particular device. Locking a device is often necessary to insure channel (i.e. communications over a path) serialization. One method known in the art for providing a lock on a storage device is to utilize a device lock data structure along with a reserve data structure. Locking a device then would require at least writing data to the lock structure and in some instances, writing data to the reserve data structure. The reserve data structure would typically be used to ensure a lock on a particular device throughout several input/output (I/O) transactions between a host computer and the particular device. Here, once one host reserved a particular device, no other host would be able to gain a lock on the device, and no other device could force a reset of the lock. Thus, in some instances two complete data transactions are required at the beginning of each I/O. When the host was finished with its data transaction with the locked device, it would then need to release both the lock and the reserve. The end of an I/O would then require two additional I/O operations.
In systems that employ locks, often a command other than an unlock command from the setting host (e.g. system command) may be utilized to reset a lock by modifying the associated lock record. Since there are two separate data structures for the lock and the reserve, a situation can arise where a lock has been released without the appropriate release of the reserve. This leads to a data integrity problem and a loss of access to a particular device when no host actually is using the device for data transactions, since as described above, when a device is reserved, no other host may lock the device for access.
It would be advantageous therefore to provide a data processing system which employs an efficient and reliable system of locks in order to provide access to shared resources such as storage devices.